package StudyCode.summary.mycollection;

import java.util.ArrayList;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class RemoveValueFromListByIndex {
	public static void main(String[] args) {
		ArrayList<String> items = new ArrayList<String>();

		items.add("red");
		items.add(0, "yellow");
		System.out.println("移除前:");
		for (String item : items) {
			System.out.println(item);
		}
		items.remove(1);
		System.out.println("移除第二个元素后:");
		for (String item : items) {
			System.out.println(item);
		}

	}
}
